<script src="<?php echo base_url();?>application/views/front_end/js/swfobject_modified.js" type="text/javascript"></script>
<div class="main-l fll">
	<!--<div class="hot-news mb-10 clb box ov-h">
        <div class="hot-news-video fll" id="view_video">
            <img src="<?php echo base_url();?>application/views/front_end/images/video.png" />
        </div>
        <div class="hot-news-c ul-hot txtB ul-none flr" style="margin-top:15px">
            <ul>
            	<?php if (count($videos)>0){
					foreach ($videos as $video){
				?>
					<li><a href="javascript:void(<?php echo $video['id']; ?>);" onclick="viewVideo(9);"><?php echo $video['ten_dat']; ?></a></li>
				<?php
					}
            	} ?>

            </ul>
        </div>
    </div>-->


    	<?php $i=0;
    		foreach ($categories as $cat){
    		$i++;
    		$cat_name='name'.$this->session->userdata['data_language'];
    		$cat_content='description'.$this->session->userdata['data_language'];
		?>
			<div class="home-l <?php if(($i%3)==0) { ?> mr-0 <?php }?> fll" >
				<div class="title"><span><a href="<?php echo base_url();?>categories/detail/<?php echo $cat['id']; ?>"><?php echo $cat[$cat_name]; ?></a></span></div>
		        <div class="home-l-c clb ov-h" style="height:290px">

		        	<div style="width:216px; height:133px">
		        		<a href="<?php echo base_url();?>categories/detail/<?php echo $cat['id']; ?>">
		        		<img src="<?php echo base_url (); ?>application/storage/images/<?php echo $cat['file_name']; ?>" width="216" height="133" /></a>
		        	</div>

		            <!--<h3><a href="<?php echo base_url();?>categories/detail/<?php echo $cat['id']; ?>"><?php echo $cat[$cat_name]; ?></a></h3>-->
		            <p style="margin-top:10px;"><?php $_content= $cat[$cat_content];
//		            	$_content=substr($_content,strpos($_content,"<p>"),strpos($_content,"</p>")-strpos($_content,"<p>")+2);
						$_content=strip_tags($_content);
						$_content=substr($_content,0,600);

        			echo $_content."...";
		            ?></p>
		            <!--<a href="#" class="colorO view-more"><?php echo $this->lang->line('system_viewmore'); ?></a>-->
		        </div>
		    </div>
		<?php
    	}
  		?>
    <div class="clb"></div>
</div>
<script type="text/javascript">
swfobject.registerObject("FlashID");

function viewVideo(id){
$.post(
		"<?php echo base_url ();?>gallery/videoDetail/"+id,
		function(data){
			$('#view_video').html(data);
		}
	);
}
</script>